package com.blackitheima3.LambdaDemo;
//抽象方法 带参带返回值
public class TestInt {
    public static void main(String[] args) {
        //匿名内部类
        getSum(new GoSum() {
            @Override
            public int getI(int x, int y) {
                return x+y;
            }
        });
        //Lambda 表达式
        getSum((x,y)->x+y);

    }
    public static void getSum(GoSum goSum){
        int i=goSum.getI(1,5);
        System.out.println(i);
    }
}
//接口
interface GoSum{
    public abstract int getI(int x,int y);
}
